Tuple Space
   HOME

TheInfoList



OR:

A tuple space is an implementation of the associative memory paradigm for parallel/distributed computing. It provides a repository of
tuple In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
s that can be accessed concurrently. As an illustrative example, consider that there are a group of processors that produce pieces of data and a group of processors that use the data. Producers post their data as tuples in the space, and the consumers then retrieve data from the space that match a certain pattern. This is also known as the blackboard metaphor. Tuple space may be thought as a form of
distributed shared memory In computer science, distributed shared memory (DSM) is a form of memory architecture where physically separated memories can be addressed as a single shared address space. The term "shared" does not mean that there is a single centralized memor ...
. Tuple spaces were the theoretical underpinning of the
Linda Linda may refer to: As a name * Linda (given name), a female given name (including a list of people and fictional characters so named) * Linda (singer) (born 1977), stage name of Svetlana Geiman, a Russian singer * Anita Linda (born Alice Lake i ...
language developed by
David Gelernter David Hillel Gelernter (born March 5, 1955) is an American computer scientist, artist, and writer. He is a professor of computer science at Yale University. Gelernter is known for contributions to parallel computation in the 1980s, and for books ...
and
Nicholas Carriero Nicholas is a male given name and a surname. The Eastern Orthodox Church, the Roman Catholic Church, and the Anglicanism, Anglican Churches celebrate Saint Nicholas every year on December 6, which is the name day for "Nicholas". In Greece, the n ...
at
Yale University Yale University is a private research university in New Haven, Connecticut. Established in 1701 as the Collegiate School, it is the third-oldest institution of higher education in the United States and among the most prestigious in the wo ...
in 1986. Implementations of tuple spaces have also been developed for
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
(
JavaSpaces A tuple space is an implementation of the associative memory paradigm for parallel/distributed computing. It provides a repository of tuples that can be accessed concurrently. As an illustrative example, consider that there are a group of process ...
),
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
,
Lua Lua or LUA may refer to: Science and technology * Lua (programming language) * Latvia University of Agriculture * Last universal ancestor, in evolution Ethnicity and language * Lua people, of Laos * Lawa people, of Thailand sometimes referred t ...
,
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
,
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
,
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sa ...
,
Smalltalk Smalltalk is an object-oriented, dynamically typed reflective programming language. It was designed and created in part for educational use, specifically for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Ka ...
,
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company **TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
, and the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
.


Object Spaces

Object Spaces is a
paradigm In science and philosophy, a paradigm () is a distinct set of concepts or thought patterns, including theories, research methods, postulates, and standards for what constitute legitimate contributions to a field. Etymology ''Paradigm'' comes f ...
for development of
distributed computing A distributed system is a system whose components are located on different computer network, networked computers, which communicate and coordinate their actions by message passing, passing messages to one another from any system. Distributed com ...
applications. It is characterized by the existence of logical entities, called ''Object Spaces''. All the participants of the distributed application share an ''Object Space''. A provider of a service encapsulates the service as an ''
Object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
'', and puts it in the ''Object Space''. Clients of a service then access the ''Object Space'', find out which object provides the needed service, and have the request serviced by the object. ''Object Spaces'', as a computing paradigm, was put forward in the 1980s by
David Gelernter David Hillel Gelernter (born March 5, 1955) is an American computer scientist, artist, and writer. He is a professor of computer science at Yale University. Gelernter is known for contributions to parallel computation in the 1980s, and for books ...
at
Yale University Yale University is a private research university in New Haven, Connecticut. Established in 1701 as the Collegiate School, it is the third-oldest institution of higher education in the United States and among the most prestigious in the wo ...
. Gelernter developed a language called
Linda Linda may refer to: As a name * Linda (given name), a female given name (including a list of people and fictional characters so named) * Linda (singer) (born 1977), stage name of Svetlana Geiman, a Russian singer * Anita Linda (born Alice Lake i ...
to support the concept of global object coordination. ''Object Space'' can be thought of as a virtual repository, shared amongst providers and accessors of network services, which are themselves abstracted as objects. Processes communicate among each other using these shared objects — by updating the state of the objects as and when needed. An object, when deposited into a space, needs to be registered with an ''Object Directory'' in the ''Object Space''. Any processes can then identify the object from the ''Object Directory'', using properties lookup, where the property specifying the criteria for the lookup of the object is its name or some other property which uniquely identifies it. A process may choose to wait for an object to be placed in the ''Object Space'', if the needed object is not already present. Objects, when deposited in an ''Object Space'' are passive, i.e., their methods cannot be invoked while the objects are in the ''Object Space''. Instead, the accessing process must ''retrieve'' it from the ''Object Space'' into its local memory, use the service provided by the object, update the state of the object and place it back into the ''Object Space''. This paradigm inherently provides
mutual exclusion In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurrent ...
. Because once an object is accessed, it has to be removed from the ''Object Space'', and is placed back only after it has been released. This means that no other process can access an object while it is being used by one process, thereby ensuring mutual exclusion.


JavaSpaces

JavaSpaces is a service specification providing a distributed object exchange and coordination mechanism (which may or may not be persistent) for
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
objects. It is used to store the distributed system state and implement
distributed algorithm A distributed algorithm is an algorithm designed to run on computer hardware constructed from interconnected processors. Distributed algorithms are used in different application areas of distributed computing, such as telecommunications, scientific ...
s. In a JavaSpace, all communication partners (peers) communicate and coordinate by sharing state. JavaSpaces can be used to achieve
scalability Scalability is the property of a system to handle a growing amount of work by adding resources to the system. In an economic context, a scalable business model implies that a company can increase sales given increased resources. For example, a ...
through parallel processing, it can also be used to provide reliable storage of objects through distributed replication, although this won't survive a total power failure like a disk; it is regarded by many to be reliable as long as the power is reliable. Distribution can also be to remote locations; however, this is rare as JavaSpaces are usually used for
low-latency Latency, from a general point of view, is a time delay between the cause and the effect of some physical change in the system being observed. Lag, as it is known in gaming circles, refers to the latency between the input to a simulation and ...
, high-performance applications rather than reliable object caching. The most common
software pattern In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine cod ...
used in JavaSpaces is the Master-Worker pattern. The Master hands out units of work to the "space", and these are read, processed and written back to the space by the workers. In a typical environment there are several "spaces", several masters and many workers; the workers are usually designed to be generic, i.e. they can take any unit of work from the space and process the task. JavaSpaces is part of the Java
Jini Jini (), also called Apache River, is a network architecture for the construction of distributed systems in the form of modular co-operating services. JavaSpaces is a part of the Jini. Originally developed by Sun Microsystems, Jini was released ...
technology, which on its own has not been a commercial success. The technology has found and kept new users over the years and some vendors are offering JavaSpaces-based products. JavaSpaces remains a niche technology mostly used in the financial services and telco industries where it continues to maintain a faithful following. The announcement of Jini/JavaSpaces created quite some hype although Sun co-founder and chief Jini architect
Bill Joy William Nelson Joy (born November 8, 1954) is an American computer engineer and venture capitalist. He co-founded Sun Microsystems in 1982 along with Scott McNealy, Vinod Khosla, and Andy Bechtolsheim, and served as Chief Scientist and CTO at ...
put it straight that this distributed systems dream will take "''a quantum leap in thinking''".Rob Guth:
More than just another pretty name: Sun's Jini opens up a new world of distributed computer systems
. ''SunWorld'', August 1998 5 January 2006/ref>


Example usage

The following example shows an application made using JavaSpaces. First, an object to be shared in the ''Object Space'' is made. Such an object is called an ''Entry'' in JavaSpace terminology. Here, the ''Entry'' is used to encapsulate a service which returns a ''Hello World!'' string, and keeps track of how many times it was used. The server which provides this service will create an ''Object Space'', or ''JavaSpace''. The ''Entry'' is then ''written'' into the ''JavaSpace''. The client ''reads'' the entry from the ''JavaSpace'' and invokes its method to access the service, updating its usage count by doing so. The updated ''Entry'' is written back to the ''JavaSpace''. // An Entry class public class SpaceEntry implements Entry // Hello World! server public class Server // Client public class Client


Books

* Eric Freeman,
Susanne Hupfer Susanne may refer to: * Susanne (given name), a feminine given name (including a list of people with the name) *, later USS ''SP-411'', a United States Navy patrol boat in commission from 1917 to 1919 *, the proposed name and designation for a ves ...
,
Ken Arnold Kenneth Cutts Richard Cabot Arnold (born 1958) is an American computer programmer well known as one of the developers of the 1980s dungeon-crawling video game '' Rogue'', for his contributions to the original Berkeley (BSD) distribution of Uni ...
: ''JavaSpaces Principles, Patterns, and Practice.'' Addison-Wesley Professional, 1. June 1999, *Phil Bishop, Nigel Warren: ''JavaSpaces in Practice.'' Addison Wesley, 2002, *Max K. Goff: ''Network Distributed Computing: Fitscapes and Fallacies'', 2004, Prentice Hall, *Sing Li, et al.: ''Professional Java Server Programming'', 1999, Wrox Press, *Steven Halter: ''JavaSpaces Example by Example'', 2002, Prentice Hall PTR,


Interviews

* * *


Articles

* * * * * * * * * * * * {{cite web , last = Nemlekar , first = Milind , year = 2001 , url = http://www.lib.ncsu.edu/resolver/1840.16/616 , title = Scalable Distributed Tuplespaces , publisher = NCSU, Dept of ECE


See also

*
Space-based architecture A Space-based architecture (SBA) is an approach to distributed computing systems where the various components interact with each other by ''exchanging'' tuples or entries via one or more shared spaces. This is contrasted with the more common Mess ...
*
Linda (coordination language) In computer science, Linda is a coordination model that aids communication in parallel computing environments. Developed by David Gelernter, it is meant to be used alongside a full-fledged computation language like Fortran or C where Linda's ro ...
*
Ken Arnold Kenneth Cutts Richard Cabot Arnold (born 1958) is an American computer programmer well known as one of the developers of the 1980s dungeon-crawling video game '' Rogue'', for his contributions to the original Berkeley (BSD) distribution of Uni ...
, lead engineer on JavaSpaces at
Sun Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
* Rinda, a JavaSpaces analog for
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called sa ...


References


Sources

* Gelernter, David
"Generative communication in Linda"
''ACM Transactions on Programming Languages and Systems'', volume 7, number 1, January 1985 *''Distributed Computing'' (First Indian reprint, 2004), M. L. Liu


External links


"TupleSpace"
at ''c2.com''
"JavaSpace Specification"
at ''jini.org'' Parallel computing Distributed computing architecture Programming languages Java platform Articles with example Java code